package com.example.a30;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class zhichu extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Button dailyExpenseButton = findViewById(R.id.dailyExpenseButton);
        Button entertainmentExpenseButton = findViewById(R.id.entertainmentExpenseButton);
        Button otherExpenseButton = findViewById(R.id.otherExpenseButton);
        Button viewAllExpensesButton = findViewById(R.id.viewAllExpensesButton);

        dailyExpenseButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(zhichu.this, DailyExpenseActivity.class);
                startActivity(intent);
            }
        });

        entertainmentExpenseButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(zhichu.this, EntertainmentExpenseActivity.class);
                startActivity(intent);
            }
        });

        otherExpenseButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(zhichu.this, OtherExpenseActivity.class);
                startActivity(intent);
            }
        });

        viewAllExpensesButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(zhichu.this, StatisticsActivity.class);
                startActivity(intent);
            }
        });
    }
}
